The invention relates generally to computers and other data processing systems and software and, more specifically, to a method, apparatus and computer program product for augmenting visualization of a software call stack.
Information visualization technology is a technology that converts data into graphics or images to be displayed on a screen and performs an interactive processing by using computer graphics and image processing techniques. Generally, developers have tooling support to visualize required information on a graphical user interface (GUI).
Analyzing software call stacks is a common and useful practice in software performance analysis. Here, the “software call stack” refers to a record of behavior of software during execution of the software. Developers usually browse and analyze software call stacks by means of the GUI that is capable of visualizing the software call stacks. The input of the software call stack visualization comes from the output of a system profiling tool. The profiling technique is developed for providing relevant information of programs upon practical execution. The profiling tool captures information of invocations (such as whether specific methods/functions are called, the number of times the specific methods/functions have been called, the relations between callers and callees, time cost in execution of the specific methods/functions, etc.) while the software is running and generates a data file as plain text output, such as a text file or a binary file. The profiling tool can assist users in analyzing and finding a bottleneck of software program execution and locating what is time-consuming, thereby ultimately realizing program optimization. However, the output of the profiling tool mainly keeps down the behavior of software programs in code level; for example, how many working threads there are, the detailed data flow and control flow (such as information of invocations), etc.
In the preexisting technique, there exists a tool that parses a data file of a software call stack outputted from the profiling tool, and recovers the software call stack to generate software call stack visualization. “Parsing” is used to generate a set of call objects based on the data file of the software call stack, and here one “call object” in the software call stack refers to one method or function executed while the software is running “Recovering” is used to identify calling relations between all the call objects in code level.
FIG. 1 shows a screen snapshot of a portion of a software call stack visualization obtained by using an existing software call stack visualization tool. However, the existing software call stack visualization tool has the following drawbacks. First, it is quite time-consuming to browse and locate a software call stack in the existing software call stack visualization. A software call stack has multifarious and disorderly information, and a huge amount of data. In the software call stack, there may be thousands of levels to be penetrated from a starting point of an application to a specific invocation. If the reached invocation is not an interesting invocation, the users need to restart from another branch and penetrate. Such repetition is performed again and again, until locating performance issues. This even may cause the users to browse a call stack in tens to hundreds of thousands of levels or even more.
Second, all information about the software is stacked in code level. The software call stack relates only to the software's behavior in code level. It cannot depict information about the software's design and the software's architecture at a high level, although such information may be of great help in analyzing software's performance.
Usually, the software is designed in an architectural way in the art. A software architect usually designs the software as a combination of a set of modules. These modules and interactions between these modules are usually defined as the software's architecture. Information about these modules and the interactions between these modules is usually defined as software architecture information. The software's architecture is completed in a software design stage and can be obtained by relevant personnel.
FIG. 2 shows an exemplary block diagram of the software architecture of existing software, wherein one block represents one module and an overlap between different modules represents that the modules have a calling relationship. Normally, it is possible to complete all module definitions in the software design stage. For example, a module may be defined as a code unit executing functionality. When the software is running, modules of the software collaborate together to fulfill a function or service as a whole. If the software has performance issues, most likely there is a bottleneck in some modules. So in many cases, a performance analyst only cares about a portion of the software call stack, and the portion can be mapped to one or more modules in the software's architecture.
Some attempts have been made in the prior art to solve the aforementioned problems in the existing software call stack visualization tool. First, using a key word or expression-based search, which provides a function of searching for a call stack based on a keyword. Second, grouping and filtering by pre-defining metrics or thresholds, which provides a filtering function based on a regular expression or thresholds. One of the examples using such a search technique is IBM® Visual Performance Analyzer (VPA) (its detailed description can be consulted from the website http://www.alphaworks.ibm.com/tech/vpa). FIG. 3 shows a screen snapshot of an inquiry interface provided using an IBM® VPA visualization window.
These means are useful, but achieve limited functions. These means only deal with the software call stack itself, and all the information of the software is still stacked in code level. These means do not allow the users to apply knowledge of the software's architecture in browsing and locating the software call stack. Accordingly, there is a need for a method that is able to argument visualization of a software call stack, so that users can apply their knowledge of the software product's architecture while visualizing and analyzing the software call stack, thereby assisting in searching for and locating execution information of an interesting module.